<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>OpenSCAD Playground</title>
    <meta name="description" content="OpenSCAD Playground: edit .scad models and render them to STL from the browser (WebAssembly build OpenSCAD, with Monaco editor and STL Viewer)">

    <link rel="icon" href="favicon.ico">
    <link rel="apple-touch-icon" href="logo192.png">
    <!-- https://developers.google.com/web/fundamentals/web-app-manifest/ -->
    <link rel="manifest" href="manifest.json">
    <meta name="theme-color" content="#000000">

    <link rel="prefetch" href="openscad.wasm">
    <link rel="prefetch" href="openscad-worker.js">
    <link rel="prefetch" href="libraries/fonts.zip">

    <link rel="prefetch" href="libraries/MCAD.zip">
    <link rel="prefetch" href="libraries/BOSL2.zip">
    <link rel="prefetch" href="libraries/BOSL.zip">
    <link rel="prefetch" href="libraries/NopSCADlib.zip">
    <link rel="prefetch" href="libraries/FunctionalOpenSCAD.zip">
    <link rel="prefetch" href="libraries/funcutils.zip">
    <link rel="prefetch" href="libraries/smooth-prim.zip">
    <link rel="prefetch" href="libraries/closepoints.zip">
    <link rel="prefetch" href="libraries/plot-function.zip">
    <link rel="prefetch" href="libraries/YAPP_Box.zip">
    <link rel="prefetch" href="libraries/Stemfie_OpenSCAD.zip">
    <link rel="prefetch" href="libraries/UB.scad.zip">
    <link rel="prefetch" href="libraries/openscad-tray.zip">

    <!-- <script type="module" src="https://ajax.googleapis.com/ajax/libs/model-viewer/3.5.0/model-viewer.min.js" defer></script> -->
    <script type="module" src="./model-viewer.min.js" defer></script>
    
    <!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/BrowserFS/2.0.0/browserfs.min.js" defer></script> -->
    <script src="./browserfs.min.js" defer></script>

    <script src="./index.js" defer></script>

    <!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/github-fork-ribbon-css/0.2.3/gh-fork-ribbon.min.css"> -->
    <link rel="stylesheet" href="./gh-fork-ribbon.min.css">

    <style>
      #root,
      body,
      html {
        display: flex;
        flex-direction: column;
        flex: 1;
        margin: 0;

        height: 100vh;
        height: var(--app-height);
      }

      .p-tabmenu-nav {
        justify-content: center;
      }

      .p-fieldset .p-fieldset-content {
        padding: 0 !important;
      }
      .p-fieldset-legend {
        background-color: rgba(255,255,255,0.4) !important;
      }

      .p-fieldset-legend,
      .p-fieldset-content {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
      }

      .absolute-fill {
        position: absolute;
        top: 0;
        right: 0;
        left: 0;
        bottom: 0;
      }

      .monaco-editor,
      .openscad-editor {
        background-color: rgba(255,255,255,0.5) !important;
      }
      textarea.openscad-editor {
        font-family: "Droid Sans Mono", "monospace", monospace;
        font-weight: normal;
        font-size: 16px;
        font-feature-settings: "liga" 0, "calt" 0;
        line-height: 22px;
        letter-spacing: 0px;
      }
      .overflow-guard,
      .monaco-scrollable-element,
      .monaco-editor-background {
        background-color: transparent !important;
      }

      .opacity-animated {
        transition: opacity 0.5s ease-in-out;
      }
      .opacity-0 {
        opacity: 0;
      }

      @media only screen and (max-height: 600px),
           only screen and (max-width: 600px),
           only screen and (max-width: 767px),
           only screen and (max-aspect-ratio: 1/2) {
        .github-fork-ribbon {
          display: none;
        }
      }

      .p-tabmenu-nav {
        padding-right: 30px;
      }

      .github-fork-ribbon:before { background-color: #333; }
    </style>
  </head>
  <body>
    <audio id="complete-sound">
      <source src="complete.wav" type="audio/wav">
      Your browser does not support the audio element.
    </audio>
    <a target="_blank" class="github-fork-ribbon"
       href="https://github.com/openscad/openscad-playground"
       data-ribbon="Fork me on GitHub"
       title="Fork me on GitHub">
       Fork me on GitHub
    </a>

    <noscript>You need to enable JavaScript to run the OpenSCAD Playground.</noscript>
    <div id="root"></div>
  </body>
</html>
